package com;

import com.services.UserService;

import java.util.ServiceLoader;

public class Test {

    public static void main(String...args) {
        ServiceLoader<UserService> loader = ServiceLoader.load(UserService.class);
        loader.forEach(userService -> userService.getName());
        System.out.println("------------------------------");
        loader.forEach(userService -> userService.getName());
    }
}
